package com.slfx.synchronize;

/**
 * @author zengqingfa
 * @className SynchronizedMethod
 * @description
 * @create 2022/8/3 21:49
 */
public class SynchronizedBlock {
    private static Object object = new Object();

    public void method() {
        synchronized (object) {
            System.out.println("Hello World!");
        }
    }
}